﻿<%@ Page Language="C#" AutoEventWireup="false" MasterPageFile="~/App_MasterPages/layout.Master"
    CodeBehind="ImageSlideShowEdit.aspx.cs" Inherits="ud_ImageSlideShow.ImageSlideShowEdit" %>

<asp:Content ContentPlaceHolderID="leftContent" ID="MPLeftPane" runat="server" />
<asp:Content ContentPlaceHolderID="mainContent" ID="MPContent" runat="server">
    <portal:mojoPanel ID="mp1" runat="server" ArtisteerCssClass="art-Post" RenderArtisteerBlockContentDivs="true">
        <mp:CornerRounderTop ID="ctop1" runat="server" />
        <asp:Panel ID="pnlWrapper" runat="server" CssClass="art-Post-inner panelwrapper admin">
            <fieldset>
                <legend>
                    <asp:Label ID="lblTitle" runat="server" CssClass="titlelabel" />
                </legend>
                <portal:mojoPanel ID="MojoPanel1" runat="server" ArtisteerCssClass="art-PostContent">
                    <div class="modulecontent">
                        <%--<asp:UpdatePanel ID="UpdatePanel1" runat="server" >
                <ContentTemplate>--%>
                        <mp:mojoGridView ID="gvItems" runat="server" AutoGenerateColumns="false" AllowPaging="true"
                            CssClass="gridviewadmin" EnableViewState="false">
                            <Columns>
                                <asp:BoundField HeaderText='<%$ Resources:ImageSlideShowResource, LabelName %>' DataField="Name" />
                                <asp:BoundField HeaderText='<%$ Resources:ImageSlideShowResource, LabelIsShow %>'
                                    DataField="IsShow" />
                                <asp:BoundField HeaderText='<%$ Resources:ImageSlideShowResource, ImageSlideShowSortOrder %>'
                                    DataField="SortOrder" />
                                <asp:BoundField HeaderText='<%$ Resources:ImageSlideShowResource, Link %>' DataField="Link" />
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:Image ID="imgImage" runat="server" ImageUrl='<%# ImageSiteRoot + "/" + ConfigurationManager.AppSettings["ImageSlideShowFolder"] + Eval("Url") %>'
                                            AlternateText='<%# Eval("Name") %>' Height="50" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:ImageButton ID="ibtnEdit" runat="server" ImageUrl='<%# ImageSiteRoot + "/Data/SiteImages/" + WebConfigSettings.EditContentImage %>'
                                            CommandName="EditItem" CommandArgument='<%# Eval("Guid") %>' ToolTip="<%# EditLinkText %>"
                                            CausesValidation="false" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:ImageButton ID="ibtnDelete" runat="server" ImageUrl='<%# ImageSiteRoot + "/Data/SiteImages/" + WebConfigSettings.DeleteLinkImage %>'
                                            CommandName="DeleteItem" CommandArgument='<%# Eval("Guid") %>' ToolTip="<%# DeleteLinkText %>"
                                            CausesValidation="false" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <EmptyDataTemplate>
                                <asp:Literal ID="ltrEmpty" runat="server" Text='<%# Resources.ImageSlideShowResource.EmptyGridView %>' />
                            </EmptyDataTemplate>
                        </mp:mojoGridView>
                        <asp:Panel ID="pnlEdit" runat="server">
                            <div class="settingrow">
                                <mp:SiteLabel ID="slblName" runat="server" ResourceFile="ImageSlideShowResource"
                                    ConfigKey="LabelName" CssClass="settinglabel" ForControl="txtName" />
                            </div>
                            <div class="settingrow">
                                <asp:TextBox ID="txtName" runat="server" CssClass="settingtextbox widetextbox" />
                                <asp:RequiredFieldValidator ID="rfvName" runat="server" ControlToValidate="txtName"
                                    ErrorMessage="*" ValidationGroup="ImageSlideShow" />
                            </div>
                            <div class="settingrow">
                                <mp:SiteLabel ID="lblLink" runat="server" ResourceFile="ImageSlideShowResource" ConfigKey="Link"
                                    CssClass="settinglabel" ForControl="txtLink" />
                            </div>
                            <div class="settingrow">
                                <asp:TextBox ID="txtLink" runat="server" CssClass="settingtextbox widetextbox" />
                            </div>
                            <div class="settingrow">
                                <mp:SiteLabel ID="lblTarget" runat="server" ResourceFile="ImageSlideShowResource"
                                    ConfigKey="Target" CssClass="settinglabel" ForControl="ddlTarget" />
                            </div>
                            <div class="settingrow">
                                <asp:DropDownList runat="server" ID="ddlTarget" CssClass="dropdownlist">
                                </asp:DropDownList>
                            </div>
                            <div class="settingrow">
                                <mp:SiteLabel ID="slblIsShow" runat="server" ResourceFile="ImageSlideShowResource"
                                    ConfigKey="LabelIsShow" CssClass="settinglabel" ForControl="chkIsShow" />
                            </div>
                            <div class="settingrow">
                                <asp:CheckBox ID="chkIsShow" runat="server" />
                            </div>
                            <div class="settingrow">
                                <mp:SiteLabel ID="slblSortOrder" runat="server" ResourceFile="ImageSlideShowResource"
                                    ConfigKey="ImageSlideShowSortOrder" CssClass="settinglabel" ForControl="txtSortOrder" />
                            </div>
                            <div class="settingrow">
                                <asp:TextBox ID="txtSortOrder" runat="server" CssClass="settingtextbox smalltextbox" />
                            </div>
                            <div class="settingrow">
                                <mp:SiteLabel ID="slblImage" runat="server" ResourceFile="ImageSlideShowResource"
                                    ConfigKey="Image" CssClass="settinglabel" ForControl="nifImageSlideShow" />
                            </div>
                            <div class="settingrow">
                                <NeatUpload:InputFile ID="nifImageSlideShow" runat="server" CssClass="settingtextbox" />
                                <NeatUpload:ProgressBar ID="npbImageSlideShow" runat="server">
                                </NeatUpload:ProgressBar>
                                <asp:Label ID="lblImageURLError" runat="server" />
                                <div runat="server" id="divImageSlideShow" visible="false" class="imagewrapper">
                                    <asp:Image ID="imgItem" runat="server" CssClass="image" />
                                </div>
                            </div>
                            <div class="settingrow">
                                <portal:mojoButton ID="btnSave" runat="server" ValidationGroup="ImageSlideShow" />
                                <portal:mojoButton ID="btnNew" runat="server" CausesValidation="false" />
                                <portal:mojoButton ID="btnDelete" runat="server" CausesValidation="false" />
                            </div>
                            <div class="settingrow">
                                <portal:mojoLabel ID="lblError" runat="server" CssClass="txterror" />
                            </div>
                        </asp:Panel>
                        <%--</ContentTemplate>
            </asp:UpdatePanel>--%>
                    </div>
                </portal:mojoPanel>
            </fieldset>
            <div class="cleared">
            </div>
        </asp:Panel>
        <mp:CornerRounderBottom ID="cbottom1" runat="server" />
    </portal:mojoPanel>
</asp:Content>
<asp:Content ContentPlaceHolderID="rightContent" ID="MPRightPane" runat="server" />
<asp:Content ContentPlaceHolderID="pageEditContent" ID="MPPageEdit" runat="server" />
